//
//  CFSetPasswordVC.m
//  CFfuturestalent
//
//  Created by 子yu 刘 on 2018/5/3.
//  Copyright © 2018年 子yu 刘. All rights reserved.
//

#import "CFSetPasswordVC.h"

@interface CFSetPasswordVC ()

@end

@implementation CFSetPasswordVC

- (void)viewDidLoad {
    [super viewDidLoad];
       self.navigationItem.rightBarButtonItem = [UIBarButtonItem barBtnItemWithTitle:@"保存" color:DEF_COLOR_GREEN target:self action:@selector(save)];
    [[self.tfPasswordOld rac_textSignal] subscribeNext:^(NSString * _Nullable x) {
        self.cleanBtn1.hidden = !(x.length>0);
        
    }];
    [[self.tfPasswordNew rac_textSignal] subscribeNext:^(NSString * _Nullable x) {
        self.cleanBtn2.hidden = !(x.length>0);
    }];
    [[self.tfPasswordCorfirme rac_textSignal] subscribeNext:^(NSString * _Nullable x) {
        self.cleanBtn3.hidden = !(x.length>0);
    }];
}

- (void)save{
    
}

- (IBAction)clean:(UIButton *)sender {
    sender.hidden = YES;
    switch (sender.tag) {
        case 10:
            self.tfPasswordOld.text = @"";
            break;
            
        case 11:
            self.tfPasswordNew.text = @"";
            break;
            
        case 12:
            self.tfPasswordCorfirme.text = @"";
            break;
            
        default:
            break;
    }
}

@end
